<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: libemb/inc/Socket.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_574d9269cd334a9d02d8928365303d98.html">libemb</a></li><li class="navelem"><a class="el" href="dir_207aad82934689048a9003fb51f06f7f.html">inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#enum-members">枚举</a>  </div>
  <div class="headertitle">
<div class="title">Socket.h 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="_base_type_8h_source.html">BaseType.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="_i_o_device_8h_source.html">IODevice.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="_mutex_8h_source.html">Mutex.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="_thread_8h_source.html">Thread.h</a>&quot;</code><br />
<code>#include &lt;pthread.h&gt;</code><br />
<code>#include &lt;sys/types.h&gt;</code><br />
<code>#include &lt;sys/socket.h&gt;</code><br />
<code>#include &lt;netinet/in.h&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
</div>
<p><a href="_socket_8h_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_socket.html">Socket</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Socket抽象基类  <a href="class_socket.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_udp_socket.html">UdpSocket</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">UdpSocket类  <a href="class_udp_socket.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_tcp_socket.html">TcpSocket</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">TcpSocket类  <a href="class_tcp_socket.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_udp_server.html">UdpServer</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">UdpServer类  <a href="class_udp_server.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_tcp_server.html">TcpServer</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">TcpServer类  <a href="class_tcp_server.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
枚举</h2></td></tr>
<tr class="memitem:afa49b80ffa7bf3f957f855318e150364"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_socket_8h.html#afa49b80ffa7bf3f957f855318e150364">SOCKET_ATTR_E</a> { <br />
&#160;&#160;<b>SOCKET_ATTR_CASTTYPE</b>, 
<b>SOCKET_ATTR_RCVBUF</b>, 
<b>SOCKET_ATTR_SNDBUF</b>, 
<b>SOCKET_ATTR_ADDR</b>, 
<br />
&#160;&#160;<b>SOCKET_ATTR_PORT</b>, 
<b>SOCKET_ATTR_UNKNOWN</b> =0xFF
<br />
 }</td></tr>
<tr class="separator:afa49b80ffa7bf3f957f855318e150364"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b2dfb107e2524548d6ff5676c8d7d76"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76">SOCKET_CASTTYPE_E</a> { <a class="el" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76a46117453e68230ac8148bbcc3553e6a7">SOCKET_BROADCAST</a>, 
<a class="el" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76a84b904820b28343501f390c549210b79">SOCKET_GROUPCAST</a>, 
<a class="el" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76adc41173fc9ae31c5f95d53527b26fb85">SOCKET_MULTICAST</a>
 }</td></tr>
<tr class="separator:a1b2dfb107e2524548d6ff5676c8d7d76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b300a6e536bd6f94ab8941d02863e7c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7c">SOCKET_TYPE_E</a> { <a class="el" href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7cac18f5df158384c4a6610e679598d1d77">SOCKET_TYPE_UDP</a>, 
<a class="el" href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7cad67cd6637f1d77f0d075c0a942b4a16c">SOCKET_TYPE_TCP</a>
 }</td></tr>
<tr class="separator:a2b300a6e536bd6f94ab8941d02863e7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75ed4a192272be57647226a203cd8975"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_socket_8h.html#a75ed4a192272be57647226a203cd8975">TCP_LINK_E</a> { <a class="el" href="_socket_8h.html#a75ed4a192272be57647226a203cd8975a7aa0eb6acdb69c0f32e4f40ca3105278">TCP_LINK_DISCONNECT</a>, 
<a class="el" href="_socket_8h.html#a75ed4a192272be57647226a203cd8975a716628d6feb1c67e6aff6822e6257f52">TCP_LINK_CONNECTED</a>
 }</td></tr>
<tr class="separator:a75ed4a192272be57647226a203cd8975"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">枚举类型说明</h2>
<a class="anchor" id="afa49b80ffa7bf3f957f855318e150364"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="_socket_8h.html#afa49b80ffa7bf3f957f855318e150364">SOCKET_ATTR_E</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>定义socket的属性 </p>

</div>
</div>
<a class="anchor" id="a1b2dfb107e2524548d6ff5676c8d7d76"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76">SOCKET_CASTTYPE_E</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>定义socket的可选项 </p>
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a class="anchor" id="a1b2dfb107e2524548d6ff5676c8d7d76a46117453e68230ac8148bbcc3553e6a7"></a>SOCKET_BROADCAST&#160;</td><td class="fielddoc">
<p>广播 </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a1b2dfb107e2524548d6ff5676c8d7d76a84b904820b28343501f390c549210b79"></a>SOCKET_GROUPCAST&#160;</td><td class="fielddoc">
<p>组播 </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a1b2dfb107e2524548d6ff5676c8d7d76adc41173fc9ae31c5f95d53527b26fb85"></a>SOCKET_MULTICAST&#160;</td><td class="fielddoc">
<p>多播 </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="a2b300a6e536bd6f94ab8941d02863e7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7c">SOCKET_TYPE_E</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>定义socket的类型 </p>
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a class="anchor" id="a2b300a6e536bd6f94ab8941d02863e7cac18f5df158384c4a6610e679598d1d77"></a>SOCKET_TYPE_UDP&#160;</td><td class="fielddoc">
<p>UDP </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a2b300a6e536bd6f94ab8941d02863e7cad67cd6637f1d77f0d075c0a942b4a16c"></a>SOCKET_TYPE_TCP&#160;</td><td class="fielddoc">
<p>TCP </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="a75ed4a192272be57647226a203cd8975"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="_socket_8h.html#a75ed4a192272be57647226a203cd8975">TCP_LINK_E</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>定义tcp连接状态 </p>
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a class="anchor" id="a75ed4a192272be57647226a203cd8975a7aa0eb6acdb69c0f32e4f40ca3105278"></a>TCP_LINK_DISCONNECT&#160;</td><td class="fielddoc">
<p>断开状态 </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a75ed4a192272be57647226a203cd8975a716628d6feb1c67e6aff6822e6257f52"></a>TCP_LINK_CONNECTED&#160;</td><td class="fielddoc">
<p>连接状态 </p>
</td></tr>
</table>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:38 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
